<form id="pagerForm" method="post" action="">
	<input type="hidden" name="pageNum" value="{$pageNum}" />
	<input type="hidden" name="numPerPage" value="{$numPerPage}" />
	<input type="hidden" name="orderField" value="{$orderField}" />
	<input type="hidden" name="orderDirection" value="{$orderDirection}" />
	<input type="hidden" name="keywords" value="{$keywords}" />
	<input type="hidden" name="sfield" value="{$sfield}" />
	<input type="hidden" name="platform" value="SMW01" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="" method="post">
		<input type="hidden" name="m" value="{$module_name}" />
		<input type="hidden" name="a" value="{$action_name}" />
	<div class="searchBar">
		<ul class="searchContent">
			<li style="width:210px;">
				<label style="width:60px;">关键字：</label>
				<input type="text" class="autoinput" name="keywords" value="{$keywords}" style="width:120px;"/>
			</li>
			<li style="width:100px;">
			<select name="sfield" class="">
				<option value="all" {if $wherefields=='all'}selected="selected"{/if}>全部</option>
				<option value="of.userid" {if $wherefields=='userid'}selected="selected"{/if}>用户ID</option>
				<option value="of.order_id" {if $wherefields=='order_id'}selected="selected"{/if}>订单ID</option>
				<option value="order.sn" {if $wherefields=='sn'}selected="selected"{/if}>订单编号</option>
			</select>
			<input type="hidden" name="sfield_name" value="of.order_id,of.userid,order.sn" />
			</li>
			<div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
			<div class="buttonActive"><div class="buttonContent"><button type="button" onclick="navTab.reload();">刷新 </button></div></div>
		</ul>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="{:U('Order/add_msg')}&id={sid_dv}" target="dialog" width="580" height="400" rel="Order_add_msg" warn="请选择一个笔订单"><span>添加备注</span></a></li>
			<li><a class="icon" href="{:U('Order/show_msg')}&id={sid_dv}" target="dialog" width="580" height="350" rel="Order_show_msg" warn="请选择一个笔订单"><span>查看备注</span></a></li>
			<li><a class="icon" href="javascript:$.printBox('w_list_print')"><span>打印页面</span></a></li>
			<li><a class="icon" target="selectedTodo" rel="ids[]" href="{:U('Order/add_depot')}" title="备货" warn="请选择一个笔订单"><span>备货</span></a></li>
		</ul>
	</div>
	<div id="w_list_print">
	<table class="list" width="98%" targetType="navTab" layoutH="96">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="ids[]" class="checkboxCtrl"></th>
				<th width="60" orderField="id" {if $orderField=='id'}class="{$orderDirection}"{/if}>编号</th>
				<!-- <th width="150">出库单</th> -->
				<th width="100" orderField="userid" {if $orderField=='userid'}class="{$orderDirection}"{/if}>结算用户</th>
				<th width="170">订单金额</th>
				<th width="170">下单时间</th>
				<th width="100" orderField="value" {if $orderField=='amount'}class="{$orderDirection}"{/if}>结算金额</th>
				<th width="150" orderField="status" {if $orderField=='status'}class="{$orderDirection}"{/if}>状态</th>
				<th width="150" orderField="ctime" {if $orderField=='add_time'}class="{$orderDirection}"{/if}>创建时间</th>
				<th width="170">操作</th>
			</tr>
		</thead>
		<tbody>
<volist name="list" id="vo">
			<tr target="sid_dv" rel="{$vo['id']}">
				<td><input name="ids[]" value="{$vo['id']}" type="checkbox"></td>
				<td><a title="{$vo['order_id']} 订单查看" target="dialog" width="800" height="650" rel="Order_detailo2o_{$vo['order_id']}" href="{:U('Order/detailo2o',array('id'=>$vo['order_id']))}">{$vo['sn']}</a></td>

				<!-- <td>{if $depot[$vo['id']]}<a href="{:U('Depot/index',array('oid'=>$vo['id']))}" target="navTab" rel="Order_depotdetail_{$depot[$vo['id']]['code']}" title="{$vo['id']}出库单">{$depot[$vo['id']]['code']}</a>{else}-{/if}</td> -->
				<td>{$vo['userid']}</td>
				<td>{$vo['amount']/100|number_format=###,2,'.',''}</td>
				<td>{$vo['add_time']|date="Y-m-d H:i:s",###}</td>
				<td>{$vo['value']/100|number_format=###,2,'.',''}</td>
				<td>{$vo['status'] == 0 ?'未结算':'已结算'}</td>
				<td>{$vo['ctime']|date="Y-m-d H:i:s",###}</td>
				<td>
				{if $vo['status']==1}
					已结算
				{elseif $vo['orstatus']==10}
					<a title="订单结算" target="ajaxTodo" href="{:U('Order/do_o2ofee',array('id'=>$vo['id'],'sn'=>$vo['sn'],'platform'=>$vo['platform']))}" class="btnSelect">订单结算</a>
				{elseif $vo['orstatus']==-10}
					订单已取消
				{else}
					订单未完成无法结算
				{/if}
				</td>
			</tr>
</volist>
		</tbody>
	</table>
	</div>
<include file="Index:pages" />
</div>
